A Static Analysis to Detect Re-Entrancy in Object Oriented Programs

نویسندگان

  • Manuel Fähndrich
  • Diego Garbervetsky
  • Wolfram Schulte
چکیده

We are interested in object-oriented programming methodologies that enable static verification of object-invariants. Reasoning soundly and effectively about the consistency of objects is still one of the main stumbling blocks to pushing object-oriented program verification into the mainstream. More precisely, any sound methodology must be able to guarantee that the invariant of the receiver object holds at all method call sites. Establishing this proof obligation is tedious, and instead programmers would like to reason informally as follows: methods should be able to assume that the object invariant holds on entry, as long as all constructors establish it, and all methods guarantee that the receiver invariant holds on exit. This reasoning is only correct under certain conditions. In this paper we present sufficient conditions that make reasoning as above sound and show how these conditions can be checked separately, allowing us to divide the verification problem into two well-defined parts: 1) reasoning about object consistency of the receiver within a single method, and 2) reasoning about the absence of inconsistent re-entrant calls. In particular, when reasoning about the object consistency of the receiver within a method, our approach does not require proving invariants on other objects whose methods are called. We present a novel whole program analysis to determine the absence of inconsistent re-entrant calls. It warns developers when re-entrant calls are made on objects whose invariants may not hold. The analysis augments a points-to analysis to compute potential call chains in order to detect re-entrant calls.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Re-Entrancy Analysis for Object Oriented Programs

We are interested in object-oriented programming methodologies that enable static verification of object-invariants. Reasoning soundly and effectively about the consistency of objects is still one of the main stumbling blocks to pushing object-oriented program verification into the mainstream. In this paper we explore a simple model of invariants that is intuitive and allows us to divide the ve...

متن کامل

A Tool for Testing of Inheritance Related Bugs in Object Oriented Software

Object oriented software development different from traditional development products. In object oriented software polymorphism, inheritance, dynamic binding are the important features. An inheritance property is the main feature. The compilers usually detect the syntax oriented errors only. Some of the property errors may be located in the product. Data flow testing is an appropriate testing me...

متن کامل

Using Static and Dynamic Escape Analysis To Enable Model Reductions in Model-Checking Concurrent Object-Oriented Programs

This paper proposes several partial order reduction strategies for model-checking concurrent object-oriented software that are based on detecting heap objects that are thread-local, i.e., reachable from a single thread only. We show how thread-local information appropriate for driving these reductions can be obtained by static analysis (using adaptations of existing escape analyses). However, w...

متن کامل

On Attributes of Objects in Object-Oriented Software Analysis

One of the modern paradigms to develop a system is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles. There is a sequence of activities to develop an analysis model. In the first step, we work in developing an initial use case model. Then in the second step, they identify a number of concepts and build a glossary of partic...

متن کامل

Analysis of object-oriented programs: a survey

We survey code analysis research, applications and infrastructure, focusing on object-oriented languages. In particular we cover static and dynamic program analysis, including non-conservative analysis, and also consider language extensions facilitating program analysis, and libraries and tools for doing analysis. The discussion outlines challenges and opportunities for program analysis when ap...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Journal of Object Technology

دوره 7  شماره 

صفحات  -

تاریخ انتشار 2008